<?php

namespace App\Common\Traits;

use App\Models\Value;
use Illuminate\Database\Eloquent\Relations\MorphToMany;

trait HasValues
{
    /**
     * @return MorphToMany
     */
    public function values(): MorphToMany
    {
        return $this->morphToMany(
            Value::class,
            'subject',
            'model_has_values'
        );
    }
}
